package com.k2091.washcar.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2021-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("car_order")
public class CarOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 发起人id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 汽车id
     */
    @TableField("car_id")
    private Long carId;

    /**
     * 服务项目id
     */
    @TableField("type_id")
    private Long typeId;

    /**
     * 接单人id
     */
    @TableField("cleaner_id")
    private Long cleanerId;

    /**
     * 地址
     */
    @TableField("site")
    private String site;

    /**
     * 状态0：待接单1：进行中 2.未评价 3.已完成
     */
    @TableField("status")
    private Integer status;

    /**
     * 发起时间2w
     */
    @TableField("starting_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime startingTime;

    /**
     * 结束时间
     */
    @TableField("ending_time")
    private LocalDateTime endingTime;

    /**
     * 预约时间
     */
    @TableField("out_time")
    private LocalDateTime outTime;

    /**
     * 评价等级
     */
    @TableField("rank")
    private String rank;

    /**
     * 金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String userMobile;
    @TableField(exist = false)
    private String cleanerName;
    @TableField(exist = false)
    private String cleanerMobile;
    @TableField(exist = false)
    private String car;
    @TableField(exist = false)
    private String color;
    @TableField(exist = false)
    private String cleanType;
}
